package com.daidaijie.moodnote.ext

import io.reactivex.Observable


/**
 * Created by daidaijie on 17-9-29.
 */

fun <T> Observable<T>.from_computation(): Observable<T> = this.subscribeOn(io.reactivex.schedulers.Schedulers.computation())

fun <T> Observable<T>.from_io(): Observable<T> = this.subscribeOn(io.reactivex.schedulers.Schedulers.io())

fun <T> Observable<T>.to_ui(): Observable<T> = this.observeOn(io.reactivex.android.schedulers.AndroidSchedulers.mainThread())

fun <T> Observable<T>.to_io(): Observable<T> = this.observeOn(io.reactivex.schedulers.Schedulers.io())

fun <T> Observable<T>.to_computation(): Observable<T> = this.observeOn(io.reactivex.schedulers.Schedulers.computation())
